package bscripts.btoolkit {
	
	import laya.resource.HTMLCanvas;

	public class ScreenShotUtil {

		public static function shotToBase64(): String {
			var htmlC:HTMLCanvas = Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0);
			var canvas:* = htmlC.getCanvas();
			var imgBase64:String = canvas.toDataURL("image/jpeg", 0.8);//图片质量
			//imgBase64:String = imgBase64.replace("image/png", "image/octet-stream");//用于本地存储
			return imgBase64;
		}

	}
}